<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 武露斌
  Date: 2021/10/23
  Time: 10:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="../../jquery-ui-1.10.4.custom/js/jquery-1.8.2.min.js"></script>
    <link rel="stylesheet" href="../../jquery-ui-1.10.4.custom/css/css.css">
</head>
<body>

<form action="list.do" method="post">
    <input type="hidden" name="pageNum"><br>
    原账号：<input type="text" name="yNumber" value="${map.yNumber}">
    原账号名称：<input type="text" name="jname"  value="${map.jname}">
    科目编号：<input type="text" name="kmNo" value="${map.kmNo}"><br>
    科目名称：<input type="text" name="kmName" value="${map.kmName}"><br>
    财务日期：<input type="text" name="sta" value="${map.sta}">--<input type="text" name="ends" value="${map.ends}"><br>
    借方：<input type="text" name="jsta" value="${map.jsta}">--<input type="text" name="jends" value="${map.jends}"><br>
    贷方：<input type="text" name="dsta" value="${map.dsta}">--<input type="text" name="dends" value="${map.dends}"><br>
    余额：<input type="text" name="ysta" value="${map.ysta}">--<input type="text" name="yends" value="${map.yends}">
    <input type="submit" value="查询">
    <input type="button" value="刷新" onclick="sx()">
</form>

<table border="1">
    <tr>
        <th>ID</th>
        <th>原账号</th>
        <th>原名称</th>
        <th>科目编号</th>
        <th>科目名称</th>
        <th>财务日期</th>
        <th>借方</th>
        <th>贷方</th>
        <th>余额</th>
        <th>借款人</th>
        <th>贷款人</th>
    </tr>
    <c:forEach items="${pageInfo.list}" var="a">
        <tr>
            <td>${a.lid}</td>
            <td>${a.yNumber}</td>
            <td>${a.jname}</td>
            <td>${a.kmNo}</td>
            <td>${a.kmName}</td>
            <td>${a.financeTime}</td>
            <td>${a.debtor}</td>
            <td>${a.creditor}</td>
            <td>${a.balance}</td>
            <td>${a.dname}</td>
            <td>${a.jname}</td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="20">
            <input type="button" value="添加" onclick="add()">
            <input type="button" value="首页" onclick="fy(1)">
            <input type="button" value="上一页" onclick="fy(${pageInfo.isFirstPage?1:pageInfo.prePage})">
            <input type="button" value="下一页" onclick="fy(${pageInfo.isLastPage?pageInfo.pages:pageInfo.nextPage})">
            <input type="button" value="尾页" onclick="fy(${pageInfo.pages})">
        </td>
    </tr>
</table>

</body>
</html>
<script>

    function fy(pageNum) {
        $("[name='pageNum']").val(pageNum)
        $("form").submit();
    }

    function sx() {
        location="list.do"
    }

    function add() {
        location="addto.do"
    }

</script>
























